namespace ForumsSearch
{
    using System;

	/// <revisionHistory>
	/// <revision author="Peter Ritchie" date="13-jul=06">
	/// added groupID field
	/// added isComment field
	/// </revision>
	/// </revisionHistory>
	public class SearchTerms
    {
        public SearchTerms()
        {
            this.siteID = "";
            this.forumName = "";
            this.isAnswered = 2;
            this.isQuestion = true;
            this.userNameAsker = "";
            this.userNameAnswerer = "";
            this.userNameContributor = "";
            this.freeText = "";
            this.helpful = false;
        }

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">
		/// removed CA1822 and CA1062 warnings
		/// </revision>
		/// </revisionHistory>
		public static string CleanString(string x)
        {
			if (String.IsNullOrEmpty(x))
			{
				throw new ArgumentNullException("x");
			}
            x = x.Replace(":", "%3A");
            x = x.Replace(" ", "+");
            x = x.Replace("(", "%28");
            x = x.Replace(")", "%29");
            x = x.Replace("\"", "%22");
            return x;
        }


		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private string forumName;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private string freeText;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private bool helpful;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private int isAnswered;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private bool isQuestion;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private string siteID;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private int threadID;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private string userNameAnswerer;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private string userNameAsker;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">changed to private</revision>
		/// </revisionHistory>
		private string userNameContributor;
		private System.Collections.Generic.ICollection<String> forumIDs = new System.Collections.Generic.List<String>();

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		private object groupID;
		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		private bool isComment;
        /// <revisionHistory>
        /// <revision author="Moayad Mardini [mardini]" date="14-August-2006">
        /// Create new variables to add the ability to search with user ID, not only with user-name
        /// </revision>
        /// </revisionHistory>
        public bool isIDContributor;
        public bool isIDAnswerer;
        public bool isIDAsker;


		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public string ForumName
		{
			get { return forumName; }
			set { forumName = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public string FreeText
		{
			get { return freeText; }
			set { freeText = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public bool Helpful
		{
			get { return helpful; }
			set { helpful = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public int IsAnswered
		{
			get { return isAnswered; }
			set { isAnswered = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public object GroupID
		{
			get { return groupID; }
			set { groupID = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public bool IsComment
		{
			get { return isComment; }
			set { isComment = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public bool IsQuestion
		{
			get { return isQuestion; }
			set { isQuestion = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public string SiteID
		{
			get { return siteID; }
			set { siteID = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public int ThreadID
		{
			get { return threadID; }
			set { threadID = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public string UserNameAnswerer
		{
			get { return userNameAnswerer; }
			set { userNameAnswerer = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public string UserNameAsker
		{
			get { return userNameAsker; }
			set { userNameAsker = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="13-jul=06">Created</revision>
		/// </revisionHistory>
		public string UserNameContributor
		{
			get { return userNameContributor; }
			set { userNameContributor = value; }
		}

		/// <revisionHistory>
		/// <revision author="Peter Ritchie" date="14-jul=06">Created</revision>
		/// </revisionHistory>
		public System.Collections.Generic.ICollection<String> ForumIDs
		{
			get { return forumIDs; }
		}
    }
}

